module(..., package.seeall) -- 使得文件中的函数在何处都可调用
require "sys"
require "pins"
require "net"
pmd.ldoset(15,pmd.LDO_VLCD)
local ledon = true -- led是否开启
local pin5 = pins.setup(pio.P0_5, 0) -- 正常是低电平，模块开机时输出高
local function powerOnIndicatorLogic()
    if ledon then
        pin5(1)
    else
        pin5(0)
    end
    if net.getNetMode() ~= 0 then ledon = not ledon end
    sys.timerStart(powerOnIndicatorLogic,500)--一秒后执行指定函数
end
powerOnIndicatorLogic()
